<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加</title>
    <!--引入vue得依赖必须再elementui之前引入vue-->
    <link type="text/css" rel="stylesheet" href="css/index.css">
    <script type="text/javascript" src="/js/vue.js"></script>
    <script type="text/javascript" src="/js/index.js"></script>
    <script type="text/javascript" src="/js/axios.min.js"></script>
    <script type="text/javascript" src="/js/qs.min.js"></script>
</head>
<body>
    <div id="add">
        <el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="demo-ruleForm">
            <el-form-item label="数量" prop="pass">
                <el-input v-model="ruleForm.num"></el-input>
            </el-form-item>
            <el-form-item label="价格" prop="checkPass">
                <el-input v-model="ruleForm.price"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="addduty()">提交</el-button>
                <el-button>重置</el-button>
            </el-form-item>
        </el-form>
    </div>

<script>
    var add = new Vue({
        el:"#add",
        data:{
            ruleForm:{},
        },
        methods:{
            addduty(){
                axios.post("/ManaginePrivilegesController/addduty",this.ruleForm).then(resp=>{
                    this.$message.success("添加成功");
                    location.href="/scheduling.html";
                });
            }
        },
    });
</script>
</body>
</html>